//
//  EPMNetworkTool.h
//  myXianfeng
//
//  Created by 马继鵬 on 17/4/30.
//  Copyright © 2017年 EPM. All rights reserved.
//

#import <AFNetworking/AFNetworking.h>
#define _NetTool ([EPMNetworkTool sheadTool])

typedef NS_ENUM(NSInteger, AFNRequestMethod){
   GET = 1,
   POST
};


@interface EPMNetworkTool : AFHTTPSessionManager

+ (instancetype)sheadTool;

/**
 数据请求

 @param method 请求方法
 @param urlString 请求地址
 @param paramater 请求参数
 @param finishedBlock 回调
 */
- (void)request:(AFNRequestMethod)method url:(NSString *)urlString paramater:(id)paramater finisedBlock:(void (^)(id, NSError *))finishedBlock;

/**
 获取首页数据

 @param finishedBlock 首页数据获取
 */
- (void)getHomePageDatafinisedBlock:(void (^)(id, NSError *))finishedBlock;

/**
 新鲜热卖

 @param finishedBlock 新鲜热卖数据
 */
- (void)getHotSallDatafinisedBlock:(void (^)(id, NSError *))finishedBlock;

/**
 程序启动广告

 @param finishedBlock 程序启动广告
 */
- (void)getStartADDatafinisedBlock:(void (^)(id, NSError *))finishedBlock;

/**
 闪电超市

 @param finishedBlock 闪电超市数据
 */
- (void)getSuperMarketDatafinisedBlock:(void (^)(id, NSError *))finishedBlock;

/**
 搜索关键词

 @param finishedBlock 搜索关键词
 */
- (void)getSearchKeywordDatafinisedBlock:(void (^)(id, NSError *))finishedBlock;

/**
 搜索返回数据

 @param finishedBlock 搜索结果
 */
- (void)getSearchReasultDatafinisedBlock:(void (^)(id, NSError *))finishedBlock;

/**
 我的订单

 @param finishedBlock 订单数据
 */
- (void)getMyOrderDatafinisedBlock:(void (^)(id, NSError *))finishedBlock;

/**
 优惠券数据

 @param finishedBlock 优惠券数据
 */
- (void)getMyCouponDatafinisedBlock:(void (^)(id, NSError *))finishedBlock;

/**
 系统消息

 @param finishedBlock 系统消息
 */
- (void)getSystemMessageDatafinisedBlock:(void (^)(id, NSError *))finishedBlock;

/**
 我的消息

 @param finishedBlock 我的消息
 */
- (void)getMyMessageDatafinisedBlock:(void (^)(id, NSError *))finishedBlock;

/**
 收货地址

 @param finishedBlock 收货地址
 */
- (void)getMyAddressDatafinisedBlock:(void (^)(id, NSError *))finishedBlock;
@end
